/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.classdiagram.figures;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.PolygonDecoration;

import com.cea.papyrus.core.figures.connection.EdgeFigure;


/**
 * 
 */
public class ExtensionFigure extends EdgeFigure {

	/**
	 * 
	 */
	private Label label;
	
	/**
	 * 
	 */
	public ExtensionFigure() {
		super();
		PolygonDecoration dec = new PolygonDecoration();
		dec.setScale( 15, 5);//size of the figure
		dec.setBackgroundColor( ColorConstants.black);
		dec.setLineWidth(1);
		setTargetDecoration(dec); // arrow at target endpoint
		setLineStyle(Graphics.LINE_SOLID);  // line drawing style
		setLineWidth(1);
		setForegroundColor( ColorConstants.black);

	}

	/**
	 * 
	 * 
	 * @param text 
	 */
	@Override
	public void setName(String text){
		label.setText(text);
	}
}